package com.ys.service.Impl;

import com.ys.mapper.SupplierMapper;
import com.ys.pojo.Supplier;
import com.ys.service.SupplierService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service("supplierService")
public class SupplierServiceImpl implements SupplierService {
    @Resource
    private SupplierMapper supplierMapper;
    @Override
    public List<Supplier> select(Supplier supplier) {
        return supplierMapper.select(supplier);
    }

    @Override
    public boolean addsinsertSupper(Supplier supplier) {
        return supplierMapper.insertSupper(supplier);
    }

    @Override
    public boolean updsupdate(Supplier supplier) {
        return supplierMapper.update(supplier);
    }
    /**
     * 查询全部供应商
     * @return
     */
    @Override
    public List<Supplier> searchAll() {
        return supplierMapper.findAll();
    }

}
